import "./App.css";
import { Route, NavLink, Switch, Redirect } from "react-router-dom";
import Home from "./pages/home";
import Login from "./pages/login";
function App() {
  return (
    <div className="App">
      <h1>React-Router-DOM</h1>
      <hr></hr>
      <NavLink activeClassName="" to="/home">
        Home
      </NavLink>
      <NavLink activeClassName="" to="/login">
        Login
      </NavLink>
      <div>
        <Switch>
          <Route path="/home" component={Home} ></Route>
          <Route path="/login" component={Login} ></Route>
          <Redirect to="/home"></Redirect>
        </Switch>
      </div>
    </div>
  );
}

export default App;
